package com.ruicar.afs.cloud.apply.pre.loan.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruicar.afs.cloud.apply.common.entity.ApplyAffiliatedUnit;
import com.ruicar.afs.cloud.apply.pre.loan.condition.AffiliatedUnitCondition;
import com.ruicar.afs.cloud.apply.pre.loan.vo.AffiliatedUnitVO;

/**
 * @author: Lee
 * @date: 2020/5/13 21:17
 * @description: 挂靠单位service
 */
public interface ApplyAffiliatedUnitService extends IService<ApplyAffiliatedUnit> {

    /**
     * 通过ID获取挂靠信息
     *
     * @param id
     * @return
     */
    public ApplyAffiliatedUnit getAffiliatedUnitById(Long id);

    /**
     * 通过申请编号获取挂靠信息
     *
     * @param applyNo
     * @return
     */
    public ApplyAffiliatedUnit getAffiliatedUnitByApplyNo(String applyNo);

    /**
     * 查询挂靠信息
     *
     * @param applyNo
     * @param affiliatedWay
     * @param vo
     */
    public void getAffiliatedUnit(String applyNo, String affiliatedWay, AffiliatedUnitVO vo);

    /**
     * 保存或更新挂靠信息
     *
     * @param applyNo
     * @param condition
     * @return
     */
    public ApplyAffiliatedUnit saveOrUpdateAffiliatedUnit(String applyNo, AffiliatedUnitCondition condition);

    /**
     * 保存挂靠信息
     *
     * @param condition
     * @return
     */
    public ApplyAffiliatedUnit saveAffiliatedUnit(String applyNo, AffiliatedUnitCondition condition);

    /**
     * 更新挂靠信息
     *
     * @param affiliatedUnit
     * @param condition
     */
    public void updateAffiliatedUnit(ApplyAffiliatedUnit affiliatedUnit, AffiliatedUnitCondition condition);

}
